
<template>
    <h1>{{ a }}</h1>
</template>

<script lang="ts">

export default {
    name: 'Test',
    setup() {
        let a = 1

        //方法
        function test() {
            a =2
        }
        return {
            a
        }
    }

}
</script>./Test.vue